package com.ziyun.erp.modules.logistics.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import com.ziyun.erp.modules.logistics.dao.ErpLogisticsInforDao;
import com.ziyun.erp.modules.logistics.entity.ErpLogisticsInforEntity;
import com.ziyun.erp.modules.logistics.service.ErpLogisticsInforService;


@Service("erpLogisticsInforService")
public class ErpLogisticsInforServiceImpl extends ServiceImpl<ErpLogisticsInforDao, ErpLogisticsInforEntity> implements ErpLogisticsInforService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<ErpLogisticsInforEntity> page = this.selectPage(
                new Query<ErpLogisticsInforEntity>(params).getPage(),
                new EntityWrapper<ErpLogisticsInforEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public ErpLogisticsInforEntity selectByLogiNo(String logiNo) {
        return this.selectOne(new EntityWrapper<>(new ErpLogisticsInforEntity())
            .eq("logi_no", logiNo)
        );
    }

}
